<?php

namespace Rebecca\RebeccaBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

use Rebecca\RebeccaBundle\Entity\RegistrosEntradas;

/**
 * RegistrosEntradas controller.
 *
 */
class RegistrosEntradasController extends Controller
{
    /**
     * Lists all RegistrosEntradas entities.
     *
     */
    public function indexAction()
    {
        /* @var $component Rebecca\RebeccaBundle\Component\RegistrosEntradasComponent */
        $component = $this->get("components.RegistrosEntradas");
        $entities = $component->getAll();

        return $this->render('RebeccaBundle:RegistrosEntradas:index.html.twig', array(
            'entities' => $entities
        ));
    }

    /**
     * Finds and displays a RegistrosEntradas entity.
     *
     */
    public function showAction($id)
    {
        /* @var $component Rebecca\RebeccaBundle\Component\RegistrosEntradasComponent */
        $component = $this->get("components.RegistrosEntradas");

        $entity = $component->get($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find RegistrosEntradas entity.');
        }

        return $this->render('RebeccaBundle:RegistrosEntradas:show.html.twig', array(
            'entity'      => $entity,
        ));
    }

}
